package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysPeixuanjianMapper;
import com.ruoyi.system.domain.SysPeixuanjian;
import com.ruoyi.system.service.ISysPeixuanjianService;
import com.ruoyi.common.core.text.Convert;

/**
 * 配选件Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-12-13
 */
@Service
public class SysPeixuanjianServiceImpl implements ISysPeixuanjianService 
{
    @Autowired
    private SysPeixuanjianMapper sysPeixuanjianMapper;

    /**
     * 查询配选件
     * 
     * @param peiXuanJianId 配选件ID
     * @return 配选件
     */
    @Override
    public SysPeixuanjian selectSysPeixuanjianById(Long peiXuanJianId)
    {
        return sysPeixuanjianMapper.selectSysPeixuanjianById(peiXuanJianId);
    }

    /**
     * 查询配选件列表
     * 
     * @param sysPeixuanjian 配选件
     * @return 配选件
     */
    @Override
    public List<SysPeixuanjian> selectSysPeixuanjianList(SysPeixuanjian sysPeixuanjian)
    {
        return sysPeixuanjianMapper.selectSysPeixuanjianList(sysPeixuanjian);
    }

    /**
     * 新增配选件
     * 
     * @param sysPeixuanjian 配选件
     * @return 结果
     */
    @Override
    public int insertSysPeixuanjian(SysPeixuanjian sysPeixuanjian)
    {
        sysPeixuanjian.setCreateTime(DateUtils.getNowDate());
        return sysPeixuanjianMapper.insertSysPeixuanjian(sysPeixuanjian);
    }

    /**
     * 修改配选件
     * 
     * @param sysPeixuanjian 配选件
     * @return 结果
     */
    @Override
    public int updateSysPeixuanjian(SysPeixuanjian sysPeixuanjian)
    {
        return sysPeixuanjianMapper.updateSysPeixuanjian(sysPeixuanjian);
    }

    /**
     * 删除配选件对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysPeixuanjianByIds(String ids)
    {
        return sysPeixuanjianMapper.deleteSysPeixuanjianByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除配选件信息
     * 
     * @param peiXuanJianId 配选件ID
     * @return 结果
     */
    @Override
    public int deleteSysPeixuanjianById(Long peiXuanJianId)
    {
        return sysPeixuanjianMapper.deleteSysPeixuanjianById(peiXuanJianId);
    }
}
